﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
  <head>
  	<base href="<%=basePath%>">
    <title>静姐博客</title>
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
	<link rel="stylesheet" type="text/css" href="css/styles.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/tools.js"></script>
	<script type="text/javascript" src="js/script.js"></script>
	<script type="text/javascript" src="js/jquery.corner.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#upBtn").click(function() {
				if ($("#upBtn").attr("title") < 0) {
					alert("已经是第一页了!");
				} else {
					location.href = "findByJingjieBlogAction?beginIndex=" + $("#upBtn").attr("title");
				}
			});
			$("#downBtn").click(function() {
				if ($("#downBtn").attr("title") >= ($("#maxPage").val())) {
					alert("已经是最后页了!");
				} else {
					location.href = "findByJingjieBlogAction?beginIndex=" + $("#downBtn").attr("title");
				}
			});
		});
	</script>
    
  </head>
  <body>
  	<div align="center" style="height: 220px;">
		<div id="top" style="width:950px;">
			<img src="images/logo.jpg" width="950" height="150" border="0" />
			<p style="font-size: 14px;float: left;">您当前的位置:&nbsp;&nbsp;<a href="findProductAction">首页</a>&nbsp;&nbsp;>>&nbsp;&nbsp;<a>静姐博客</a>&nbsp;&nbsp;</p>
			<div style="width: 110px;float: right;">
				<p ><a href="sendBlog.jsp" style="float: right;position: relative;top:2px;width:80px;height:20px; border: 1px solid skyblue;left: -4px;top:-6px;">发表</a></p>
			</div>
		</div>
	</div>
  	<div align="center">
  		<form action="findByTitleInJingjieBlogAction" method="post">
	      	<input type="text" value="请输入关键字(如&quot;去黑头&quot;)" name="caseTitle" style="width: 300px;height: 30px;" id="caseTitle"/>
			<input type="submit" value="搜索博客" style="height: 30px;width: 80px;"/>
    	</form>
  		<table style="border: 1px solid #cccccc;font-size: 14px;text-align: center;">
  			<tr height="30px" bgcolor="yellow">
  				<td width="100px">博客名称</td>
  				<td width="300px">博客内容简介</td>
  				<td width="150px">发表日期</td>
  				<s:if test="#session.ui!=null">
  					<td width="100px">操作</td>
  				</s:if>
  			</tr>
  			<s:if test="lc!=null">
	        	<s:iterator value="lc">
	        		<tr height="30px" bgcolor="pink">
	        			<td><s:property value="caseTitle"/></td>
	        			<td><a href="showAllContentBlogAction?caseId=<s:property value='caseId'/>"><s:property value="%{caseContent.substring(0,15)}"/>...</a></td>
	        			<td><s:property value="caseDate"/></td>
	        			<s:if test="#session.ui!=null">
		  					<td><a href="delBlogAction?caseId=<s:property value='caseId'/>">删除</a></td>
		  				</s:if>
	        		</tr>
	        	</s:iterator>
        	</s:if>
  			
  		</table>
  		<br/>
  		<div style="float: left;width:100%;" align="center">
			<div style="width:200px;" align="center">
				<a id="upBtn" title="<s:property value='beginIndex-8'/>" style="position:absolute; width:100px;height:20px; border: 1px solid #666;">◀上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a id="downBtn" title="<s:property value='beginIndex+8'/>" style="position:absolute; width:100px;height:20px; border: 1px solid #666;">下一页▶</a>
				<input type="hidden" id="maxPage" value="<s:property value='maxPage'/>" />
			</div>
		</div>
  	</div>
   <hr width="100%" style="color:#ccc;float: left;position: relative;top:20px;" />
	<br />
	<div align="center" style="width: 100%;float: left;position: relative;top: 20px;">
		<a href="#" style="text-decoration:none;color:#666;font-size: 14px;">联系我们</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<a href="#" style="text-decoration:none;color:#666;font-size: 14px;">加入我们</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<s:if test="#session.ui!=null">
			<a href="exitAction"
				style="text-decoration:none;color:#666;font-size: 14px;">【退出】</a>
		</s:if>
		<s:else>
			<a href="javascript:showBox('登录','login()')"
				style="text-decoration:none;color:#666;font-size: 14px;">管理员入口</a>
		</s:else>
		<br /> <br /> <br />
	</div>
  </body>
</html>
  				